Skip to content

Conversation

@nwmitchell
Copy link
Contributor

The help text indicates to use the orgid when listing instances by org, however this failed saying the corresponding org didn't exist. Instead, the org name needed to be supplied for the command to succeed. This change simply fixes the help text to reflect the proper value to use when listing with the --org flag.

Help text before change:

$ ./brev ls --help                                                                                     #[main]
List instances within your active org. List all instances if no active org is set.

Usage:
  brev ls [flags]

Aliases:
  ls, list

Examples:

  brev ls
  brev ls orgs
  brev ls --org <orgid>


Flags:
      --all          show all workspaces in org
  -h, --help         help for ls
  -o, --org string   organization (will override active org)

Global Flags:
      --user string   non root user to use for per user configuration of commands run as root
      --version       Print version output

Failing command:

$ ./brev ls orgs
Your organizations:
 NAME          ID                              
 nmitchell-hq  org-2saxhbCMWE3CVXJYLu6YPR0e6qp 
 * launchpad   org-2tDrWXYp4PQMGCHVQtjoEDBXBOr 
 nca-xrndd     org-2uoT5UHyNUSLsGuSVP0hYteAMYR 

Switch orgs:
        brev set <NAME> ex: brev set nmitchell-hq

$ ./brev ls --org org-2saxhbCMWE3CVXJYLu6YPR0e6qp
[error] 
github.com/brevdev/brev-cli/pkg/cmd/ls.NewCmdLs.func3
/Users/nmitchell/git/brev/brev-cli/pkg/cmd/ls/ls.go:99
: [error] 
github.com/brevdev/brev-cli/pkg/cmd/ls.RunLs
/Users/nmitchell/git/brev/brev-cli/pkg/cmd/ls/ls.go:168
: no org found with name org-2saxhbCMWE3CVXJYLu6YPR0e6qp

Working command:

$ ./brev ls --org nmitchell-hq
No instances in org nmitchell-hq

Start a new instance:
Switch to another org:
        brev set launchpad

Updated help text:

$ ./brev ls --help                                                                          #[fix-ls-help-org]
List instances within your active org. List all instances if no active org is set.

Usage:
  brev ls [flags]

Aliases:
  ls, list

Examples:

  brev ls
  brev ls orgs
  brev ls --org <name>


Flags:
      --all          show all workspaces in org
  -h, --help         help for ls
  -o, --org string   organization (will override active org)

Global Flags:
      --user string   non root user to use for per user configuration of commands run as root
      --version       Print version output

@nwmitchell nwmitchell requested a review from theFong March 26, 2025 17:14
@nwmitchell nwmitchell self-assigned this Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants